package net.sending;

import java.net.InetAddress;
import java.net.DatagramPacket;
import java.io.IOException;

import util.Config;

public class Util {

    public static void sendUDPPacket(byte[] b, InetAddress a) {
        DatagramPacket packet = new DatagramPacket(b, b.length, a, Config.getInstance().getReceivePort());
        try {
            SocketFactory.getBroadcastSocket().send(packet);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

}